﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SectionSelectPaper.aspx.cs"
    Inherits="ExaminationSys.View.Section.SectionSelectPaper" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript" language="javascript">
        var setID = function (id, sectionid, type) {
            try {

                var hidden = document.getElementById('<%=IDHidden.ClientID %>');
                hidden.value = id;
                var hidden1 = document.getElementById('<%=HidSectionID.ClientID %>');
                hidden1.value = sectionid;

                var hidden2 = document.getElementById('<%=HidTestType.ClientID %>');
                hidden2.value = type;
            } catch (e) {
                alert(e);
            }
        };

        //编辑信息
        var win;
        function setInfo() {
            var sid = document.getElementById('<%=HidSectionID.ClientID %>').value;
            var pageurl = "../Paper/SelectPaperList.aspx?SectionID=" + sid;
            win = new Ext.Window({
                title: '选择试卷',
                // maximizable : true,
                // maximized : true,
                width: 780,
                height: 520,
                // autoScroll : true,
                // bodyBorder : true,
                // draggable : true,
                isTopContainer: true,
                loadMask: {
                    showMask: true,
                    msg: "正在加载，请稍后……"
                },
                modal: true,
                resizable: false,
                contentEl: Ext.DomHelper.append(document.body, {
                    tag: 'iframe',
                    style: "border 0px none;scrollbar:false",
                    src: pageurl,
                    height: "100%",
                    width: "100%"
                })
            });
            win.setPaperInfo = function (paperid, title) {

                var hidPaperId = document.getElementById('<%=HidPaperId.ClientID %>');
                hidPaperId.value = paperid;
                document.getElementById('PaperID-inputEl').value = title;
         
            };
            win.show();

        }



    </script>
</head>
<body>
    <form id="Form1" runat="server">
    <input type="hidden" id="IDHidden" runat="server" />
    <input type="hidden" id="HidSectionID" runat="server" />
    <input type="hidden" id="HidTestType" runat="server" />
    <input type="hidden" id="HidPaperId" runat="server" />
    <ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="X" />
    <ext:FormPanel ID="PaperFeedbackEditPanel" runat="server" Icon="ChartOrganisation"
        DefaultAnchor="95%" Padding="5" BodyPadding="10">
        <Items>
          <ext:FieldContainer ID="FieldContainer3" runat="server"  Layout="HBoxLayout">
                <Items>
                    <ext:Label ID="NavLabel" runat="server" Text="栏目管理->栏目详细->"></ext:Label>
                </Items>
             </ext:FieldContainer>
            <ext:FieldContainer ID="FieldContainer1" runat="server" FieldLabel="试卷" Layout="HBoxLayout">
                <Items>
                    <ext:TextField ID="PaperID" AllowBlank="false" runat="server" Width="190" />
                    <ext:Button ID="Button1" runat="server" Text="选择试卷" Icon="BulletGo" OnClientClick="setInfo()"
                        Width="50">
                    </ext:Button>
                   
                </Items>
            </ext:FieldContainer>
                 <ext:FieldContainer ID="FieldContainer2" runat="server" Margin="64" Layout="HBoxLayout">
                <Items>
                   <ext:Button ID="SaveButton" runat="server" Text="保存" Margin="5" Icon="BulletGo" Width="80">
                        <DirectEvents>
                            <Click OnEvent="SaveSectionPaper" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                    <ext:Button ID="CancelButton" runat="server" Text="返回" Margin="5" Icon="Cancel" Width="80">
                        <DirectEvents>
                            <Click OnEvent="CancelSectionPaper" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                </Items>
            </ext:FieldContainer>
        </Items>
    </ext:FormPanel>
    </form>
</body>
</html>
